<?php
/**
 * Created by PhpStorm.
 * User: 4399-1500
 * Date: 2018/6/12
 * Time: 14:53
 */

namespace models\DAO;


class Group_accessModel extends BaseModel
{
    public $_uid = null;
    public $_group_id = null;

    /**
     * 单例实例
     */
    static private $instance = null;

    /**
     * UserModel constructor.
     * @throws \Yaf\Exception
     */
    public function __construct(){
        parent::__construct(str_replace("Model", "", substr(get_class($this), strrpos(get_class($this), "\\")+1)));
//        $this->meta = new \stdClass();
    }

    /**
     * @return UserModel|null
     * @throws \Yaf\Exception
     */
    static public function getInstance(){
        if(is_null(self::$instance)){
            self::$instance = new self('group_access');
        }
        return self::$instance;
    }

    /**
     *
     */
    public function __destruct(){
        self::$instance = null;
    }

    /**
     * set 设置数据表模型类的参数字段数据
     * @param string $name      参数名
     * @param string $value     参数值
     * @return $this
     */
    public function __set($name = "", $value = ""){
        $this->$name = $value;
        return $this;
    }

    /**
     * get获取数据表模型类的参数字段
     * @param string $name      参数名
     * @return mixed
     */
    public function __get($name = ""){
        return $this->$name;
    }
}